<!-- 头部全局 -->
<?php TPL::output('aomas/m_global/header2.tpl.htm'); ?>
<link rel="stylesheet" href="<?php echo G_STATIC_URL; ?>/aomas/css/common/swiper.min.css">
<link rel="stylesheet" href="<?php echo G_STATIC_URL; ?>/aomas/css/m_shop_info/m_shop_info.css">
<style>
    .m-shop-info-content img{
        width: 100%;
    }
</style>
<?php $goods = $this->goods_info; ?>
<div class="m-section">
    <div class="m-shop-img">
        <div class="swiper-container">
            <div class="swiper-wrapper">


                <?php foreach($this->goods_photos as $key=>$item){ ?>
                <div class="swiper-slide">
                <img alt=""  src="<?php echo get_goods_cover_url($this->goods_info['goods_id'],'info',$item['file_location']); ?>">
                </div>
                <?php }?>
                <?php foreach($this->goods_style_list as $key=>$item){ ?>
                <div class="swiper-slide">
                    <img alt="" src="<?php echo get_goods_cover_url($this->goods_info['goods_id'],'info',$item['goods_color_pic']); ?>" >
                </div>
                <?php }?>


            </div>
          
        </div>
       
    </div>

   
    <div class="m-shop-title">
        商品信息
    </div>

    <div class="m-shop-info-p">
        <p class="m-shop-info-name"><?php echo $goods['goods_name'];?></p>
        <p class="m-shop-info-yh"><?php echo $goods['goods_brief'];?> </p>
        <!--<p class="m-shop-info-des">asdasddasdasdasd </p>-->
        <p class="m-shop-info-price"><?php echo $goods['shop_price'];?> 元</p></p>
    </div>

    <!-- <div class="m-shop-quan">
        <span class="m-shop-quan-code">领券</span>
        <span class="m-shop-quan-des">啊是打算打算大所大所大</span>
        <span class="m-shop-quan-do"> 领取</span>
    </div> -->

    <!-- <div class="m-shop-select">
        <p>机型选择</p>
        <ul class="m-shop-select-list clearfix">
            <li>
                <span class="m-shop-select-radio active">
                    <span></span>
                </span>
                <span class="m-shop-select-span">HONGSE</span>
            </li>
            <li>
                <span class="m-shop-select-radio active">
                    <span></span>
                </span>
                <span class="m-shop-select-span">HONGSE</span>
            </li>
            <li>
                <span class="m-shop-select-radio active">
                    <span></span>
                </span>
                <span class="m-shop-select-span">HONGSE</span>
            </li>
        </ul>
    </div> -->
    <div class="m-shop-select">
        <a href="javascript:;" class="m-shop-to js-add-cart"  data-id="<?php echo $goods['goods_id'];?>" >
            <img src="<?php echo G_STATIC_URL; ?>/aomas/common/shop-collect2.png" alt="">
            <span>加入收藏夹</span>
        </a>
        <a href="<?php echo $goods['jd_url'];?>" class="m-shop-to">
            <img src="<?php echo G_STATIC_URL; ?>/aomas/common/jd.png" alt="">
            <span>前往京东购买</span>
        </a>
        <a href="<?php echo $goods['tb_url'];?>" class="m-shop-to">
            <img src="<?php echo G_STATIC_URL; ?>/aomas/common/tm.png" alt="">
            <span>前往天猫购买</span>
        </a>
    </div>

    <!-- <div class="m-shop-select clearfix">
        <p>颜色选择</p>
        <ul class="m-shop-select-list clearfix">
            <li>
                <span class="m-shop-select-radio active">
                    <span></span>
                </span>
                <span class="m-shop-select-span">HONGSE</span>
            </li>
            <li>
                <span class="m-shop-select-radio active">
                    <span></span>
                </span>
                <span class="m-shop-select-span">HONGSE</span>
            </li>
            <li>
                <span class="m-shop-select-radio active">
                    <span></span>
                </span>
                <span class="m-shop-select-span">HONGSE</span>
            </li>
        </ul>
    </div> -->

    <div class="m-shop-title">
        商品详情
    </div>
    <div class="m-shop-info-content">

    </div>
</div>

<script src="<?php echo G_STATIC_URL; ?>/aomas/js/common/swiper.min.js"></script>
<script src="<?php echo G_STATIC_URL; ?>/aomas/js/common/common.js" type="text/javascript"></script>
<script src="<?php echo G_STATIC_URL; ?>/aomas/js/m_cart/m_cart.js" type="text/javascript"></script>
<script src="<?php echo G_STATIC_URL; ?>/aomas/js/common/toast.script.js" type="text/javascript"></script>
<script src="<?php echo G_STATIC_URL; ?>/aomas/js/common/jquery.lazyload.min.js" type="text/javascript"></script>

<script>
    var mySwiper = new Swiper('.swiper-container', {
        // autoplay: true,//可选选项，自动滑动
        // pagination: {
        //     el: '.swiper-pagination',
        // },
    })

    $(function() {

        var detail =  '<?php echo $this->goods_info["goods_desc"];?>';

        $(detail).find("img").map(function (index,item) {

            $(item).addClass('lazy').css({'min-height':'200px','min-width':'200px'});
            item.setAttribute('data-original',item.src);
            item.removeAttribute('src');
            $(".m-shop-info-content").append(item);
        });
        $("img.lazy").lazyload({
            placeholder : "<?php echo G_STATIC_URL; ?>/aomas/loading.gif",
            threshold :10,
            effect: "fadeIn"
        });
    });
</script>
</body>
</html>